General cleanup of shell bits#127
Closed
charles-dyfis-net wants to merge 1 commit intoconcourse:masterfrom
Closed
Conversation
- Avoid `sed` use for functionality built into shell parameter expansion - Avoid piping into a `while read` loop, which introduces the surprising behaviors discussed in [BashFAQ 24](https://mywiki.wooledge.org/BashFAQ/024) - Switch from external command `which` to built-in, POSIX-standardized `command -v` - Avoid using pushd and popd (which are interactive-extension options, not guaranteed to be compiled into a noninteractive shell at all). With this applied, `shellcheck scripts/*` runs clean. Not yet addressed: - Failure to sanitize or escape strings substituted into JSON (base image does not provide jq or this would be trivial) - Use of [`set -e`](https://mywiki.wooledge.org/BashFAQ/105)
b3731d9 to
39dce15
Compare
Member
|
I fixed up the scripts in #134 and in some other commits/PRs as well. Not sure if you want to keep this open still or close it now. |
Member
|
Closing because stale and no response from OP. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
seduse for functionality built into shell parameter expansionwhile readloop, which introduces the surprising behaviors discussed in BashFAQ #24whichto built-in, POSIX-standardizedcommand -vWith this applied,
shellcheck scripts/*runs clean.Not yet addressed:
set -e